//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.ysy.tz.core.utils;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
import java.net.URL;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;

public class FileResourceLoader {
    private static PathMatchingResourcePatternResolver pathMatchingResourcePatternResolver = new PathMatchingResourcePatternResolver();

    public FileResourceLoader() {
    }

    public static URL loadURL(String location) throws IOException {
        return pathMatchingResourcePatternResolver.getResource(location).getURL();
    }

    public static URI loadURI(String location) throws IOException {
        return pathMatchingResourcePatternResolver.getResource(location).getURI();
    }

    public static File loadFile(String location) throws IOException {
        return pathMatchingResourcePatternResolver.getResource(location).getFile();
    }

    public static InputStream loadInputStream(String location) throws IOException {
        return pathMatchingResourcePatternResolver.getResource(location).getInputStream();
    }
}
